using System.Web.UI;

namespace SubversionReports.Web.Controls
{
    public class PagedControl : UserControl
    {
        /// <summary>
        /// Gets the page number.
        /// </summary>
        /// <value>The page number.</value>
        public int PageNumber
        {
            get { return int.Parse(Request["PageNumber"] ?? "1"); }
        }

        /// <summary>
        /// Gets the size of the page.
        /// </summary>
        /// <value>The size of the page.</value>
        public int PageSize
        {
            get { return int.Parse(Request["PageSize"] ?? "10"); }
        }

        /// <summary>
        /// Gets the sort by.
        /// </summary>
        /// <value>The sort by.</value>
        public string SortBy
        {
            get { return Request["SortBy"] ?? string.Empty; }
        }

        /// <summary>
        /// Gets the sort direction.
        /// </summary>
        /// <value>The sort direction.</value>
        public string SortDirection
        {
            get { return Request["SortDirection"] ?? "ASC"; }
        }

        /// <summary>
        /// Gets the filters.
        /// </summary>
        /// <value>The filters.</value>
        public string Filters
        {
            get { return Request["Filters"] ?? string.Empty; }
        }
    }
}
